import multiprocessing
import time

g_list = list()

def rask():
    for i in range(1, 10):
        g_list.append(i)
        time.sleep(0.2)
        print(i)
        pass
    pass


if __name__ == '__main__':
    rask_process = multiprocessing.Process(target=rask)
    # 方式一：
    # rask_process.daemon = True
    rask_process.start()
    time.sleep(1)
    # 方式二；
    # rask_process.terminate()
    # print("over")
